const state = {
  list: [],
  page: {}
}

const actions = {
  saveList: ({ commit }, payload) => {
    commit('SAVELIST', payload)
  }
}

const mutations = {
  SAVELIST: (state, payload) => {
    state.list = payload.result
    state.page = {
      size: 10,
      number: payload.number || 1,
      total: payload.resultNum
    }
  }
}

export default {
  state,
  actions,
  mutations
}